projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e1e973
)
Handle clicks in indentation area
author
Kristian Rietveld
<kris@gtk.org>
Sun, 12 Dec 2010 16:32:59 +0000
(17:32 +0100)
committer
Kristian Rietveld
<kris@gtk.org>
Sun, 12 Dec 2010 16:32:59 +0000
(17:32 +0100)
For this case, we want to set focus on the first cell in the column.
gtk/gtktreeviewcolumn.c
patch
|
blob
|
history
diff --git
a/gtk/gtktreeviewcolumn.c
b/gtk/gtktreeviewcolumn.c
index fd5eb1c6cfb47577d9227a9a4c048e0c27e33927..2621cb360b3d2d26e64924a2618036d8a34cd1eb 100644
(file)
--- a/
gtk/gtktreeviewcolumn.c
+++ b/
gtk/gtktreeviewcolumn.c
@@
-1479,6
+1479,14
@@
_gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column,
GtkCellRenderer *match = NULL;
GtkTreeViewColumnPrivate *priv = column->priv;
+ if (x < cell_area->x)
+ {
+ /* This can happen when we click in the "indentation". In this
+ * case, we set x to cell_area->x, the start of the first cell.
+ */
+ x = cell_area->x;
+ }
+
match = gtk_cell_area_get_cell_at_position (priv->cell_area,
priv->cell_area_context,
priv->tree_view,